import request from '@/utils/request'
//登录路由
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

//令牌认证路由
export function check() {
  return request({
    url: '/user/check',
    method: 'post',
  })
}

export function pageList(data,pageSize,pageNum) {
  return request({
    url: `/findByPage?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
